package com.etasist.beans;

/**
 * @author issa
 *
 */

import java.util.ArrayList;

public class Servers implements Comparable {
	public String serverIp;

	public String serverPort;
	
	public String userName;
	
	public String password;
	
	public String authtype;

	public ArrayList serverCommands;
	
	public int serverID;

	public String getServerIp() {
		return serverIp;
	}

	public void setServerIp(String serverIp) {
		this.serverIp = serverIp;
	}

	public String getServerPort() {
		return serverPort;
	}

	public void setServerPort(String serverPort) {
		this.serverPort = serverPort;
	}

	public int getServerID() {
		return serverID;
	}

	public void setServerID(int serverID) {
		this.serverID = serverID;
	}
	
	public ArrayList getServerCommands() {
		return serverCommands;
	}

	public void setServerCommands(ArrayList serverCommands) {
		this.serverCommands = serverCommands;
	}

	  public int compareTo(Object anotherServer) throws ClassCastException {
		    if (!(anotherServer instanceof Servers))
		      throw new ClassCastException("A Commands object expected.");
		    int anotherServersID = ((Servers) anotherServer).getServerID(); 
		    return this.serverID - anotherServersID;    
		  }

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getAuthtype() {
		return authtype;
	}

	public void setAuthtype(String string) {
		authtype = string;
	}

}
